﻿@model View_Member
@{
    ViewBag.Title = "修改会员等级";
    Layout = "~/Views/Shared/_ContentLayout.cshtml";


    var viewModel = Model ?? new View_Member();
    ADZ_MasterEntities dbcontext = new ADZ_MasterEntities();
    Dictionary<string, string> dc = new Dictionary<string, string>();
}

<form id="S_Form" action="@Url.Action("uplevel", "account")" method="post" class="definewidth m20" enctype="multipart/form-data">
    <table class="table table-bordered table-hover definewidth m10">
        <tr>
            <td colspan="2" style="width:50%">
                <h5>
                    @ViewBag.Title,<font color="red">等级调整后，会员APP端必须重新登录</font>
                </h5>
                <input type="hidden" value="@viewModel.uid" name="uid" />
            </td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">代购编号</td>
            <td>
                @Model.replace_buyer_NO
            </td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">手机号</td>
            <td>
                @Model.account_mobile
            </td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">会员名称</td>
            <td>
                @Model.member_name
            </td>
        </tr>
        <tr>
            <td class="tableleft">会员等级<em>*</em></td>
            <td>
                <select id="member_level" name="member_level">
                    @{
                        dc = new Dictionary<string, string>();
                        dbcontext.ADZ_MemberLevelConfig.ToList().ForEach(t =>
                        {
                            dc.Add(t.member_level.ToString(), t.member_name);
                        });
                    }
                    @HtmlPagerHelper.ShowSelectOpton(dc, viewModel.member_level.ToString())
                </select>&nbsp;
            </td>
        </tr>
        <tr>
            <td class="tableleft"></td>
            <td colspan="3">
                <div><span id="spMsg"></span></div>
                <button type="submit" class="btn btn-primary">保存</button> &nbsp;&nbsp;
                <button type="button" class="btn btn-success" name="backid"  id="backid">返回</button>
                @*<button type="button" class="btn btn-success" onclick="backRoot('@Url.Action("accountlist", "account")')">返回</button>*@
            </td>
        </tr>
    </table>
    <script>
        BUI.use('bui/overlay', function (overlay) {
            $(function () {
                var validator = $('form').validate({
                    errorLabelContainer: $("#errorContainer"),
                    errorElement: "span",
                    submitHandler: function (form) {
                        $(form).ajaxSubmit(function (result) {
                            ShowActionResult(result, goback);
                        });
                    }
                });

            });
        });
    </script>
</form>

